package org.flexspeedup.blog.admin.events
{
import flash.events.Event;

import org.flexspeedup.model.IListOption;

/**
 * Changes the category for the selected post
 */
public class ChangePostCategoryEvent extends Event
{
    //--------------------------------------------------------------------------
    //
    //  Class Properties
    //
    //--------------------------------------------------------------------------

    //--------------------------
    // ID
    //--------------------------
    /**
     * Unique id for this event.
     */
    public static const ID:String = "ChangePostCategoryEvent";
    
    //--------------------------------------------------------------------------
    //
    // Constructor
    //
    //--------------------------------------------------------------------------

    /**
     * Creates a new instance of the <code>ChangePostCategoryEvent</code> event 
     */    
    public function ChangePostCategoryEvent(category:IListOption)
    {
        super(ID, true, true);
        _category = category;
    }

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    //  category
    //----------------------------------

    /**
     *  @private
     */
    private var _category:IListOption;

    /**
     * The new category
     */
    public function get category():IListOption
    {
        return _category;
    }

    //--------------------------------------------------------------------------
    //
    //  Overridden Methods - Event
    //
    //--------------------------------------------------------------------------

    /**
     * @inheritdoc flash.events.Event#clone
     */
    override public function clone():Event
    {
        return new ChangePostCategoryEvent(category);
    }
}
}